package org.anupta.realm.server.realm.packet.login;

import org.anupta.realm.main.Main;
import org.anupta.realm.server.realm.client.RealmClient;
import org.anupta.realm.server.realm.packet.RealmPacket;

public class HelloConnection extends RealmPacket {
	private StringBuilder hash = new StringBuilder();

	public HelloConnection(RealmClient client, String hash) {
		super(client);
		this.hash.append(hash);
		pack();
		doPacket();
	}

	@Override
	public void unpack() {
	}
	
	@Override
	public void pack() {
		packetOut.append("HC").append(hash);
	}

	@Override
	public void doPacket() {
		client.send(packetOut.toString());
		Main.out.println(new StringBuilder("Sending HC to : ").append(client.getIp()).toString());
	}
}
